<template>
  <div>

    <!--头部信息-->
    <el-container style="padding-top: 10px;background-color: #f2fbfa;">
      <el-aside style="width: 220px;" >
        <left/>
<!--        侧边栏-->
      </el-aside>
      <el-container>
        <el-header style="padding-top: 10px">
          <el-row>
            <el-col :span="12">
              <div class="grid-content bg-purple" @click="tofirst">首页</div>
            </el-col>
            <el-col :span="12">
              <div class="grid-content bg-purple-light" style="text-align:right;padding-right:15px;cursor: pointer;" @click ="goout">退出</div>
            </el-col>
          </el-row>
        </el-header>
        <el-main>
          <div
              style="background-color: #ffffff; text-align: left; border-radius: 10px; padding: 20px 30px 0 20px;">
            <router-view/>
            <br>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>



</template>

<script setup>
import {onMounted} from 'vue';
import Left from './Left.vue';
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
const goout=()=>{
  localStorage.removeItem('jwt_token');
  router.push("/")
}
const tofirst=()=>{
  router.push("/firsthome")
}
onMounted(() => {
  let payload = localStorage.jwt_token.split(".")[1] // 载荷
  console.log(payload)
});
</script>







<style>

</style>
